package com.ssy.lingxi.marketing.service;

import com.ssy.lingxi.common.model.dto.UserLoginCacheDTO;
import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.marketing.api.model.request.*;
import com.ssy.lingxi.marketing.api.model.response.GroupPurchaseDetailResponse;
import com.ssy.lingxi.marketing.api.model.response.GroupPurchaseListResponse;
import com.ssy.lingxi.marketing.api.model.response.GroupPurchaseShareDetailResponse;
import com.ssy.lingxi.marketing.api.model.response.OrderListGroupPurchaseResponse;

import java.util.List;

/**
 * 活动订单相关
 * @author yzc
 * @version 2.0.0
 * @date 2021/9/2
 */
public interface IActivityOrderService {

    /**
     * 查询拼团列表(状态:拼团中)
     * @param sysUser
     * @param request
     * @return
     */
    Wrapper<PageData<GroupPurchaseListResponse>> getGroupPurchaseList(UserLoginCacheDTO sysUser, GroupPurchasePageRequest request);

    /**
     * 查询拼团详情
     * @param sysUser
     * @param request
     * @return
     */
    Wrapper<GroupPurchaseDetailResponse> getGroupPurchaseDetail(UserLoginCacheDTO sysUser, GroupPurchaseDetailRequest request);

    /**
     * 添加拼团
     * @param req
     * @return
     */
    Wrapper<Long> addGroupPurchase(GroupPurchaseAddRequest req);

    /**
     * [拼团超时]更新拼团状态
     * @param parseLong
     */
    void updateGroupPurchaseStatus(long parseLong);

    /**
     * 查询拼团详情（根据订单id）
     * @param sysUser
     * @param request
     * @return
     */
    Wrapper<GroupPurchaseDetailResponse> getOrderGroupPurchaseDetail(UserLoginCacheDTO sysUser, OrderGroupPurchaseDetailRequest request);

    /**
     * 查询拼团列表信息（订单列表页呈现）
     * @param sysUser
     * @param request
     * @return
     */
    Wrapper<List<OrderListGroupPurchaseResponse>> getOrderListGroupPurchase(UserLoginCacheDTO sysUser, OrderListGroupPurchaseRequest request);

    /**
     * 校验是否重复参与同一个拼团
     * @param req
     * @return
     */
    Wrapper<Boolean> isRepeatJoinGroupPurchase(GroupPurchaseCheckRequest req);

    /**
     * 拼团信息（拼团分享相关信息）
     * @param sysUser
     * @param request
     * @return
     */
    Wrapper<GroupPurchaseShareDetailResponse> getOrderGroupPurchaseShareDetail(UserLoginCacheDTO sysUser, OrderGroupPurchaseDetailRequest request);
}
